// 登录组件注册表
import GlassLogin from './GlassLogin.vue'
import SimpleLogin from './SimpleLogin.vue'
import ClassicLogin from './ClassicLogin.vue'
import ModernLogin from './ModernLogin.vue'
import CardStyleLogin from './CardStyleLogin.vue'
import GradientLogin from './GradientLogin.vue'
import MinimalLogin from './MinimalLogin.vue'
import DarkLogin from './DarkLogin.vue'
import SidebarLogin from './SidebarLogin.vue'
import SpaceLogin from './SpaceLogin.vue'
import CyberpunkLogin from './CyberpunkLogin.vue'
import ParticleFluidLogin from './ParticleFluidLogin.vue'
import HolographicLogin from './HolographicLogin.vue'
import StarWarsLogin from './StarWarsLogin.vue'
import Terrain3DLogin from './Terrain3DLogin.vue'
import DreamcoreLogin from './DreamcoreLogin.vue'

// 可用的登录组件
export const loginComponents = {
  glass: {
    name: 'glass',
    label: '玻璃拟态风格',
    description: '带有动态背景和玻璃拟态效果的现代登录界面',
    component: GlassLogin,
    preview: 'glass'
  },
  simple: {
    name: 'simple',
    label: '简洁风格',
    description: '简洁清爽的传统登录界面',
    component: SimpleLogin,
    preview: 'simple'
  },
  classic: {
    name: 'classic',
    label: '经典风格',
    description: '传统经典的登录界面，简洁实用',
    component: ClassicLogin,
    preview: 'classic'
  },
  modern: {
    name: 'modern',
    label: '现代风格',
    description: '现代感十足的登录界面，带有渐变背景',
    component: ModernLogin,
    preview: 'modern'
  },
  card: {
    name: 'card',
    label: '卡片式风格',
    description: '优雅的卡片式设计，带有渐变头部和阴影效果',
    component: CardStyleLogin,
    preview: 'card'
  },
  gradient: {
    name: 'gradient',
    label: '渐变背景风格',
    description: '动态渐变背景，色彩丰富的登录界面',
    component: GradientLogin,
    preview: 'gradient'
  },
  minimal: {
    name: 'minimal',
    label: '极简风格',
    description: '极简设计，专注于内容的纯净登录界面',
    component: MinimalLogin,
    preview: 'minimal'
  },
  dark: {
    name: 'dark',
    label: '深色主题',
    description: '深色背景配星空动画，适合夜间使用',
    component: DarkLogin,
    preview: 'dark'
  },
  sidebar: {
    name: 'sidebar',
    label: '侧边栏风格',
    description: '左右分栏布局，左侧品牌展示，右侧登录表单',
    component: SidebarLogin,
    preview: 'sidebar'
  },
  space: {
    name: 'space',
    label: '太空风格',
    description: '科幻太空主题，包含星空、行星、小行星等动画效果',
    component: SpaceLogin,
    preview: 'space'
  },
  cyberpunk: {
    name: 'cyberpunk',
    label: '赛博朋克风格',
    description: '未来科幻风格，霓虹灯光、数字雨、全息网格等特效',
    component: CyberpunkLogin,
    preview: 'cyberpunk'
  },
  particle: {
    name: 'particle',
    label: '粒子流体风格',
    description: '动态粒子系统，鼠标交互，流体连接效果',
    component: ParticleFluidLogin,
    preview: 'particle'
  },
  holographic: {
    name: 'holographic',
    label: '全息投影风格',
    description: '科技感全息界面，扫描线、发光边框、故障特效',
    component: HolographicLogin,
    preview: 'holographic'
  },
  starwars: {
    name: 'starwars',
    label: '星球大战风格',
    description: '星球大战主题，开场滚动文字、太空背景动画',
    component: StarWarsLogin,
    preview: 'starwars'
  },
  terrain3d: {
    name: 'terrain3d',
    label: '3D地形风格',
    description: '动态3D地形生成，可调海拔和细节，自然景观',
    component: Terrain3DLogin,
    preview: 'terrain3d'
  },
  dreamcore: {
    name: 'dreamcore',
    label: '梦核怀旧风格',
    description: 'VHS录像带风格，复古CRT显示器效果，梦幻元素',
    component: DreamcoreLogin,
    preview: 'dreamcore'
  }
}

// 获取默认登录组件名称
export function getDefaultLoginComponent() {
  return 'glass'
}

// 根据名称获取登录组件
export function getLoginComponent(name) {
  return loginComponents[name]?.component || loginComponents[getDefaultLoginComponent()].component
}

// 获取所有可用的登录组件列表
export function getAvailableLoginComponents() {
  return Object.values(loginComponents).map(comp => ({
    name: comp.name,
    label: comp.label,
    description: comp.description,
    preview: comp.preview
  }))
}

